<?php
namespace app\common\config\validate;


use app\common\system\logic\FormLogic;
use think\Validate;

class ConfigSourceValidate extends Validate
{
    protected $rule = [
        'id' => ['require', 'gt:0'],
        'title' => ['require'],
        // 'title' => ['require', 'unique:config_source,title'],
    ];

    protected $message = [
        'id.require' => '参数错误',
        'id.gt' => '参数错误',
        'title.require' => '来源名称不能为空',
        'title.unique' => '来源名称已经存在'
    ];

    protected $scene = [
        'create' => ['token','title'],
        'edit' => ['id', 'title'],
        'delete' => ['id'],
    ];
}